package utils;

public enum ResponseCode {
    SUCCESS(100, "操作成功"),
    OK_REGISIER(101, "注册成功！请24小时内打开邮箱，点击邮箱中的链接地址，进行激活才能使用该账号！"),


    ERROR(200, "操作失败"),
    NOT_ROLE(201, "无角色"),
    NOT_LOGIN(202, "未登录"),
    NOT_USER(203, "不存在该用户"),
    NOT_USER_OR_PASSWORD(204, "没有该用户或者密码不对"),
    NOT_PASSWORD(205, "密码不正确"),
    NOT_ACTIVE(206, "用户没有激活"),
    ERROR_DB(207, "数据库异常"),
    ERROR_USERNAME(208, "您来晚了，这个用户名已经被别人领走了！"),
    ERROR_EMAIL_ADDRESS(209, "您输入的邮箱地址格式不对，注册失败！"),
    ERROR_EMAIL_SEND(210, "激活邮件发送失败！"),
    NOT_ACTIVES(211,"激活用户失败！"),
    NOT_ACTIVESTIME(212,"激活码已过期！"),
    ERROR_PARAMS(211,"请求参数格式对不对或类型不对或缺失参数项！");
    private int code;
    private String desc;

    ResponseCode(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
